<template>
  <div class="charts-pannel" :style="{background:title==='工作面'?'transparent':title==='危险源预警报警'?'#0E335E':'#0b2c54'}">
    <img src="@/assets/images/lefticon.png" alt="" />
    <span class="title">{{ title }}</span>
    <div style="margin-top: 10px">
      <slot name="chartContent"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "chartsPannel",
  props: {
    title: {
      type: String,
      default: "自定义标题",
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>

<style scoped lang="scss">
.charts-pannel {
  padding: 10px;
  // background-color: #0b2c54;
  width: 300px;
  height: 200px;
  .title {
    color: #fff;
    margin-left: 5px;
  }
}
</style>

